<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			/*
		      继承:
			  1.属性 call
			  2.行为 prototype
		
		
		    */
			function Person(name, age) {
				this.name = name;
				this.age = age;
			}

			function Student(name, age, score) {
				// this.name = name;
				// this.age = age;
				this.score = score;
				Person.call(this, name, age);
			}

			var stu = new Student("zhangsan", 20, 90);
			console.log(stu.name);
			console.log(stu.score);

			// function Worker(name, age, salary) {
			// 	// this.name = name;
			// 	// this.age = age;
			// 	this.salary = salary;
			// }
		</script>
	</body>
</html>
